package com.lsh.oms.api.model.order.delivery;

import com.lsh.oms.api.common.constants.ValidationConstants;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 发货单详情
 *
 * @author miaozhuang
 * @date 18/6/23
 */
@Setter
@Getter
@NoArgsConstructor
@ToString
public class OrderSendDetailDTO implements Serializable {

    private static final long serialVersionUID = 2745340437215053906L;

    /**
     * 物美码
     */
    @NotBlank(message = ValidationConstants.NOT_BLANK)
    private String code;

    private String barcode;

    private String pack_code;

    private String sku_name;
    /**
     * 商品码
     */
    @NotNull(message = ValidationConstants.NOT_NULL)
    @Min(value = 0, message = ValidationConstants.ERROR)
    private Long item_id;
    /**
     * 数量
     */
    @NotNull(message = ValidationConstants.NOT_NULL)
    @DecimalMin(value = "0", message = ValidationConstants.ERROR)
    private BigDecimal qty;
    /**
     * 运单号
     */
    private String waybill_id;
    /**
     * 发货信息
     */
    private String driver_info;
    /**
     *
     */
    @NotNull(message = ValidationConstants.NOT_NULL)
    @DecimalMin(value = "0", message = ValidationConstants.ERROR)
    private BigDecimal pack_num;
    /**
     * 箱数
     */
    @NotNull(message = ValidationConstants.NOT_NULL)
    @DecimalMin(value = "0", message = ValidationConstants.ERROR)
    private BigDecimal box_num;
    /**
     * 散数
     */
    @NotNull(message = ValidationConstants.NOT_NULL)
    @DecimalMin(value = "0", message = ValidationConstants.ERROR)
    private BigDecimal left_ea_num;
    /**
     * 详情
     */
    @NotBlank(message = ValidationConstants.NOT_BLANK)
    private String obd_detail_ext;
    /**
     * 箱规
     */
    private String sku_define;
    /**
     * socode
     */
    @NotBlank(message = ValidationConstants.NOT_BLANK)
    private String so_code;
    /**
     * 货主机构
     */
    @NotBlank(message = ValidationConstants.NOT_BLANK)
    private String supplier_org;

    private String weight;

//    @NotNull(message = ValidationConstants.NOT_BLANK)
    private Integer itemCode;
}
